package com.atguigu.devops.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @Author atguigu-mqx
 * @Description TODO
 * @Date 2023/9/11 11:37
 * @Version 1.0
 */
@RestController
public class IndexController {

    @GetMapping("hello")
    public String hello(){
        //  返回当前系统时间.
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        return "现在北京时间是:\t"+simpleDateFormat.format(new Date());
    }
}
